#include "IDGenerator.hh"
#include <sstream>
#include <iomanip>
#include <cstdlib>
#include <ctime>

int IDGenerator::nextID = 1000;

std::string IDGenerator::generateAccountID(bool isSavings) {
    std::ostringstream oss;
    int prefix = isSavings ? 6221 : 6222;  // 6221 for savings, 6222 for checking
    oss << prefix;
    oss << std::setw(8) << std::setfill('0') << nextID++;
    return oss.str();
}
